<%--
  Created by IntelliJ IDEA.
  User: 86191
  Date: 2022/12/1
  Time: 21:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<title>登录系统</title>

</script>
<style>
  .login {
    text-align: center;
    margin: 0 auto;
    width: 600px;
    height: 520px;
    background-color: rgba(87, 86, 86, 0.2);
    border-radius: 25px;
    box-shadow: 5px 2px 35px -7px #ff9a9e;
  }

  .login_form span {
    color: aqua;
    font-size: 20px;

  }

  body {
    padding: 0;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    background-image: linear-gradient(#a18cd1 0%, #fbc2eb 100%);
    background-size: cover;
    flex: 1;
    align-items: center;
  }

  .login h2 {
    margin-top: 40px;
    color: aliceblue;
    font-weight: 100;
  }
</style>
</head>
<!--
    登录页面：
    1、用户名
    2、密码
    3、登录按钮
    4、注册按钮

 -->

<body>
<div class="login">
  <h2 id="h2">查看成绩系统！！！！</h2>
  <span s>
            姓名: </span><input type="text" ,value="" ,name="u_name" id="u_id"><br></span>
  <span > 密码: </span><input type="password" ,value="" ,name="u_password" id="u_pass"><br>
  <button id="bu2">登录</button> <button>重置</button><br>
  <span id="u_span" style="color:brown"></span>
</div>
<script>
  document.getElementById("bu2").onclick=function(){
    if(document.getElementById("u_id").value==null || document.getElementById("u_id").value==""){
      document.getElementById("u_span").innerHTML="姓名不能为空";
      return;
    }
    if(document.getElementById("u_pass").value==null || document.getElementById("u_pass").value==""){
      document.getElementById("u_span").innerHTML="密码不能为空";
      return;
    }
    window.location.href="StudentLogin?u_name="+document.getElementById("u_id").value+"&u_password="+document.getElementById("u_pass").value;
  }
</script>
</body>
</html>
